package com.cskaoyan.shopping.service.remote;

import com.cskaoyan.mall.api.OrderProductService;
import com.cskaoyan.mall.dto.ClearCartItemRequest;
import com.cskaoyan.mall.dto.ClearCartItemResponse;
import com.cskaoyan.mall.dto.ProductDetailRequest;
import com.cskaoyan.mall.dto.ProductDetailResponse;
import com.cskaoyan.shopping.service.ICartService;
import com.cskaoyan.shopping.service.IProductService;
import com.cskaoyan.shopping.service.impl.ICartSeviceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther cskaoyan
 * @date 2022/6/16:16:33
 */

@RestController
public class OrderProductServiceImpl implements OrderProductService {

    @Autowired
    ICartService iCartSevice;

    @Autowired
    IProductService iProductService;

    @Override
    public ClearCartItemResponse clearCartItemByUserID(ClearCartItemRequest request) {
        return iCartSevice.clearCartItemByUserID(request);
        // return null;
    }

    @Override
    public ProductDetailResponse getProductDetail(ProductDetailRequest request) {
        return iProductService.getProductDetail(request);
    }
}
